﻿CREATE TRIGGER CustomerLoanHistory_Tracking_Delete
ON [dbo].[CustomerLoanHistory] 
AFTER delete
AS 
BEGIN
	UPDATE Sync.CustomerLoanHistory_Tracking 
	SET LastUpdatedDate  = getdate(),
		IsDeleted = 1
	FROM Sync.CustomerLoanHistory_Tracking s JOIN DELETED i
    ON s.LoanHistoryID = i.LoanHistoryID
END














